package org.restorator.dao.implement.engin;

import org.restorator.dao.base.OrderDao;
import org.restorator.dao.jdbc.Enricher;
import org.restorator.entity.Table;
import org.restorator.exception.DataStoreException;

public class TableEnricher implements Enricher<Table> {

    private final OrderDao orderDao;

	public TableEnricher(OrderDao orderDao) {
        this.orderDao = orderDao;
    }

	@Override
	public void enrich(Table enrichable) throws DataStoreException {
        if(enrichable != null)
            enrichable.setOrder(orderDao.getOrdersByTableId(enrichable.getTableID()));
	}

	@Override
	public void insert(Table obj) {
	}

	@Override
	public void update(Table obj) {
	}

    @Override
    public void delete(Table obj) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}